package org.finmanager.statistics;

import com.alee.laf.tabbedpane.TabbedPaneStyle;
import com.alee.laf.tabbedpane.WebTabbedPane;

import javax.swing.*;
import java.util.List;

/**
 * Created by Kelvin on 10/4/2014.
 */

//Applying use of TAB in statistic function
public class StatisticsUI {
	WebTabbedPane mainPanel = new WebTabbedPane();

	public StatisticsUI() {
		mainPanel.setTabbedPaneStyle(TabbedPaneStyle.attached);
		mainPanel.setFocusable(false);
	}

	public void addTab(List<JComponent> components, List<String> titles) {
		for (int i = 0; i < components.size(); i++) {
			mainPanel.addTab(titles.get(i), components.get(i));
		}
	}

	public JComponent getMainComponent() {
		return mainPanel;
	}
}
